import com.google.common.eventbus.EventBus;

/**
 * Created on 2020/3/24
 * Title: 测试类
 * Description: 测试类
 * Copyright: Copyright(c) 2020
 * Company:
 *
 * @author yifeng
 */
public class Test {

    public static void main(String[] args) {
        EventBus eventBus = new EventBus();
        // 创建老师
        Teacher tom = new Teacher("Tom");
        Teacher jerry = new Teacher("Jerry");
        // 老师注册上线
        eventBus.register(tom);
        eventBus.register(jerry);
        // 学生提问
        Gper gper = new Gper(eventBus, "张三");
        Question question = new Question();
        question.setContent("观察者模式在JDK中的应用有哪些？");
        gper.submitQuestion(question);

    }

}
